package com.example.cake.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("sys_order")
public class SysOrder {
    @TableId(value = "id", type = IdType.AUTO)
    private String id;
    private String cakeId;
    private String userId;
    private String totalMoney;
    private String state;
    private String alipayNo;
    @TableField(value = "create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @TableField(value = "create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime payTime;
    @TableLogic(value = "0", delval = "1")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) //逻辑删除不返回给前端
    private Integer isDelete;
    @TableField(exist = false)
    private SysCake sysCake;
    @TableField(exist = false)
    private SysCustomer sysCustomer;
}

